Probability mass function Zipf PMF for N = 10 on a log-log scale. The horizontal axis is the index k . (Note that the function is only defined at integer values of k. The connecting lines do not indicate continuity.) |
|
Cumulative distribution function Zipf CMF for N = 10. The horizontal axis is the index k . (Note that the function is only defined at integer values of k. The connecting lines do not indicate continuity.) |
|
parameters: | (real) (integer) |
---|---|
support: | |
pmf: | |
cdf: | |
mean: | |
median: | |
mode: | |
variance: | |
skewness: | |
ex.kurtosis: | |
entropy: | |
mgf: | |
cf: |
Zipf's law, an empirical law formulated using mathematical statistics, refers to the fact that many types of data studied in the physical and social sciences can be approximated with a Zipfian distribution, one of a family of related discrete power law probability distributions. The law is named after the linguist George Kingsley Zipf (pronounced /ˈzɪf/) who first proposed it (Zipf 1935, 1949), though J.B. Estoup appears to have noticed the regularity before Zipf.[1]
Contents |
Zipf's law states that given some corpus of natural language utterances, the frequency of any word is inversely proportional to its rank in the frequency table. Thus the most frequent word will occur approximately twice as often as the second most frequent word, which occurs twice as often as the fourth most frequent word, etc. For example, in the Brown Corpus "The" definitive article is the most frequently occurring word, and by itself accounts for nearly 7% of all word occurrences (69,971 out of slightly over 1 million). True to Zipf's Law, the second-place word "of" accounts for slightly over 3.5% of words (36,411 occurrences), followed by "and" (28,852). Only 135 vocabulary items are needed to account for half the Brown Corpus.
The same relationship occurs in many other rankings, unrelated to language, such as the population ranks of cities in various countries, corporation sizes, income rankings, etc. The appearance of the distribution in rankings of cities by population was first noticed by Felix Auerbach in 1913.[2] Empirically a data set can be tested to see if Zipf's law applies by running the regression log R = a - b log n where R is the rank of the datum, n is its value and a and b are constants. For Zipf's law to apply the constant b = 1. When this regression is applied to cities a better fit has been found with b = 1.07.
Zipf's law is most easily observed by plotting the data on a log-log graph, with the axes being log(rank order) and log(frequency). For example, the word "the" (as described above) would appear at x = log(1), y = log(69971). The data conform to Zipf's law to the extent that the plot is linear.
Formally, let:
Zipf's law then predicts that out of a population of N elements, the frequency of elements of rank k, f(k;s,N), is:
Zipf's law holds if the number of occurrences of each element are independent and identically distributed random variables with power law distribution [3]
In the example of the frequency of words in the English language, N is the number of words in the English language and, if we use the classic version of Zipf's law, the exponent s is 1. f(k; s,N) will then be the fraction of the time the kth most common word occurs.
The law may also be written:
where HN,s is the Nth generalized harmonic number.
The simplest case of Zipf's law is a "1⁄f function". Given a set of Zipfian distributed frequencies, sorted from most common to least common, the second most common frequency will occur ½ as often as the first. The third most common frequency will occur ⅓ as often as the first. The nth most common frequency will occur 1⁄n as often as the first. However, this cannot hold exactly, because items must occur an integer number of times; there cannot be 2.5 occurrences of a word. Nevertheless, over fairly wide ranges, and to a fairly good approximation, many natural phenomena obey Zipf's law.
Mathematically, it is impossible for the classic version of Zipf's law to hold exactly if there are infinitely many words in a language, since the sum of all relative frequencies in the denominator above is equal to the harmonic series and therefore:
In English, the word frequencies have a very heavy-tailed distribution, and can therefore be modeled reasonably well by a Zipf distribution with an s close to 1.
As long as the exponent s exceeds 1, it is possible for such a law to hold with infinitely many words, since if s > 1 then
where ζ is Riemann's zeta function.
It is not known why Zipf's law holds for most languages.[4] However, it may be partially explained by the statistical analysis of randomly-generated texts. Wentian Li has shown that if you create a document where each character is chosen randomly from a uniform distribution of all letters (plus a space character), then the "words" in this document also follow the general trend of Zipf's law (appearing approximately linear on log-log plot).[5] This suggests a partial explanation for why Zipf's law might hold for most natural languages (although the law holds much more strongly to natural language than to random texts).
An alternate explanation is that Zipf's Law arises necessarily from features of natural language. It is proposed that this occurs because neither speakers nor hearers using a given language want to work any harder than necessary to reach understanding, and the process that results in approximately equal distribution of effort leads to the observed Zipf distribution.[6]
Zipf's law now refers more generally to frequency distributions of "rank data," in which the relative frequency of the nth-ranked item is given by the Zeta distribution, 1/(nsζ(s)), where the parameter s > 1 indexes the members of this family of probability distributions. Indeed, Zipf's law is sometimes synonymous with "zeta distribution," since probability distributions are sometimes called "laws". This distribution is sometimes called the Zipfian or Yule distribution.
A generalization of Zipf's law is the Zipf–Mandelbrot law, proposed by Benoît Mandelbrot, whose frequencies are:
The "constant" is the reciprocal of the Hurwitz zeta function evaluated at s.
Zipfian distributions can be obtained from Pareto distributions by an exchange of variables.[7]
The tail frequencies of the Yule–Simon distribution are approximately
for any choice of ρ > 0.
If the natural log of some data are normally distributed, the data follow the log-normal distribution. This distribution is useful when random influences have an effect that is multiplicative rather than additive.
In the parabolic fractal distribution, the logarithm of the frequency is a quadratic polynomial of the logarithm of the rank. This can markedly improve the fit over a simple power-law relationship.[7] Like fractal dimension, it is possible to calculate Zipf dimension, which is a useful parameter in the analysis of texts.[8]
It has been argued that Benford's law is a special case of Zipf's law.[7] This special connection between these two laws can be explained by the fact that they both originate from the same scale invariant functional relation from statistical physics and critical phenomena.[9]
Primary:
Secondary:
|